<template>
 <view class="goods-list" >
   <view v-if="!input[0]" class="line2" ><text   >暂时没查询到您开启的盲盒记录~</text></view>
    
      <view v-for="(item, i) in input" :key="i" >
       
        <view class="goods-item">
          <!-- 商品左侧图片区域 -->
          <view class="goods-item-left">
            
            <image src="../../static/img/head_girl.png" v-if="item.blind_sex == 2" class="goods-pic"></image>
              <image src="../../static/img/head_boy.png" v-if="item.blind_sex == 1" class="goods-pic"></image>
          </view>
          <!-- 商品右侧信息区域 -->
          <view class="goods-item-right">
            <!-- 商品标题 -->
            <view class="goods-name">个人介绍：
            {{item.introduction}}</view>
            <view class="goods-info-box">
              <!-- 商品价格 -->
              <view class="goods-price">微信号：{{item.wechat_number}}</view>
               <!-- 商品数量 -->
                <view >手机号：{{item.phone_number}}</view>
            </view>
          </view>
        </view>
      </view>
    </view>
    
   
 
</template>

<script>
  // 1. 按需导入 mapMutations 辅助函数
  import { mapMutations,mapState } from 'vuex'
  export default {
    data() {
      return {
             number : ''
           
              
    }
  },	
  computed:{
      ...mapState('m_user',['input'])
	
		
		},
  onLoad() {
    this.number = this.input.length
    console.log(this.input.length)
      
  },
  onBackPress(e) {  
  // 这里可以自定义返回逻辑，比如下面跳转其他页面
  	uni.switchTab({
  		url: '/pages/index/index'
  	});
  	// return true 表示禁止默认返回
  	return true
  }, 

   methods:   {
     
        
  
  },


  }
</script>

<style lang="scss">
  .line2{
    text-align:center;
    margin-top: 30rpx;
  }
.goods-item {
  display: flex;
  padding: 10px 5px;
  border-bottom: 1px solid #f0f0f0;

  .goods-item-left {
    margin-right: 5px;

    .goods-pic {
      width: 100px;
      height: 100px;
      display: block;
      
     
    }
  }

  .goods-item-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    .goods-name {
      display: flex;
      
      font-size: 16px;
       
    }

    .goods-price {
      font-size: 16px;
      color: #c00000;
      margin-bottom: 15rpx;
    }
  }
}

</style>
